package reduce.fz.com.reduce.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.squareup.picasso.Picasso;

import reduce.fz.com.reduce.R;
import reduce.fz.com.reduce.bean.User;

/**
 * Created by qingshengzheng on 15/9/15.
 */
public class HeaderHorAdapter extends BaseHorizontalAdapter<HeaderHorAdapter.HeaderViewHolder,User> {
    public HeaderHorAdapter(Context context) {
        super(context);
    }

    @Override
    public HeaderViewHolder createViewHolder(ViewGroup parent) {
        View view=layoutInflater.inflate(R.layout.header_witness_item,parent,false);
        return new HeaderViewHolder(view);
    }

    public static class HeaderViewHolder extends BaseRecycleViewHolder<User> {
        private ImageView itemView;
        public HeaderViewHolder(View itemView) {
            super(itemView);
            this.itemView=(ImageView)itemView;
        }
        @Override
        public void renderView(User data,int position) {
           // Picasso.with(context).load(data.getHeadurl()R).into(itemView);
            Picasso.with(context).load(R.drawable.shuaige).into(itemView);

        }
    }
}
